home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / port / aix32 / gcc-related / unistd.h < prev   
C/C++ Source or Header  |  1994-08-01  |  2KB  |  84 lines

  1. #ifndef _H_UNISTD
  2.  
  3. extern "C" {
  4. #include <sys/stat.h>
  5. #include <fcntl.h>
  6. #include <signal.h>
  7.  
  8. /* avoid clash with (identical, but differing in whitespace) definitions in stdio.h (some macro-preprocessors are whitespace sensitive) */
  9. #ifdef SEEK_SET
  10. #undef SEEK_SET
  11. #endif
  12. #ifdef SEEK_CUR
  13. #undef SEEK_CUR
  14. #endif
  15. #ifdef SEEK_END
  16. #undef SEEK_END
  17. #endif
  18.  
  19. // Override these definitions in /usr/include/unistd.h
  20. #define chdir  Fx_chdir
  21. #define execve Fx_execve
  22. #define execvp Fx_execvp
  23. #define getcwd Fx_getcwd
  24. #define read   Fx_read
  25. #define write  Fx_write
  26.  
  27. // Avoid clashes with C++ operator new
  28. #define new    Fx_new
  29.  
  30. #include_next <unistd.h>
  31.  
  32. #undef chdir
  33. #undef execve
  34. #undef execvp
  35. #undef getcwd
  36. #undef read   
  37. #undef write
  38.  
  39. #undef new
  40. #ifdef NULL
  41. #undef NULL
  42. #define NULL 0
  43. #endif
  44.  
  45. int chdir(const char*);
  46. int execve(const char*, const char*[], const char*[]);
  47. int execvp(const char*, const char*[]);
  48. char *getcwd(const char *, int);
  49. int read(int, void*, unsigned);
  50. int write(int, const void*, unsigned);
  51.  
  52. // Add these functions - somehow they are missing from /usr/include/unistd.h
  53. int acct(const char*);
  54. int brk(char*);
  55. int chroot(const char*);
  56. int closepl();
  57. char *getwd(char *);
  58. int ioctl(int, int ...);
  59. int lockf(int, int, off_t);
  60. int mknod(const char*, int, int);
  61. int mount(const char*, const char*, int);
  62. int nice(int);
  63. int openpl();
  64. int plock(int);
  65. void profil(const char*, int, int, int);
  66. int ptrace(int, int, int, int);
  67. int rmount(const char *,const char *, const char *, int);
  68. char *sbrk(int);
  69. int setpgrp();
  70. int stime(const long*);
  71. void sync();
  72. void sys3b(int, int ...);
  73. int umount(const char*);
  74. int vfork(void); 
  75.  
  76. int system(const char*);
  77. int kill(pid_t, int);
  78.  
  79. int accessx(const char *, int, int);
  80. int faccessx(int, int, int);
  81.  
  82. }
  83. #endif
  84.